#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
3
3
1 2 1
4
1 2 3 4
8
3 5 2 5 1 2 1 4
    return 0;

}
